<template>
  <div :class="{global_dark: darkMode}">
    <LeftMenu/>
    <router-view v-slot="{ Component,route }">
      <transition :name="route.meta?.transitionName || 'fade'"
                  :mode="route.meta?.transitionMode || ''">
        <component :is="Component"/>
      </transition>
    </router-view>
  </div>
</template>

<script>
import LeftMenu from "@/components/LeftMenu";
import {reactive, toRefs} from "vue";

export default {
  name: "App",
  components: {LeftMenu},
  setup() {
    const data = reactive({
      darkMode: true
    })
    return {...toRefs(data)}
  }
}
</script>

<style lang="less">
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  overflow: hidden;
}

#app {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;

  .page {
    position: absolute;
    min-height: 100vh;
    min-width: 100vw;
  }
}
</style>
